<template>
    <div class="myGoodDetail">
        <ul class="tabs">
            <li :class="[cur === 0 ? 'active' : '']" @click="cur = 0">商品介绍</li>
            <li :class="[cur === 1 ? 'active' : '']" @click="cur = 1">商品评价</li>
        </ul>
        <div class="goodInfo" v-if="cur === 0" v-html="content"></div>
        <div v-else>
            <my-reputation v-for="item in reps" :key="item.id" :rep="item"></my-reputation>
        </div>
    </div>
</template>

<script>
import myReputation from '@/components/myReputation/myReputation' 
export default {
    name: 'myGoodDetail',
    components: {
        myReputation
    },
    props: {
        content: String,
        reps: Array
    },
    data() { 
        return {
            cur: 0
        }
    },
    created() {

    },
    methods:{

    }
}
</script>

<style scoped lang="scss">
.myGoodDetail {
    background-color: #fff;
    width: 100%;
    .goodInfo {
        width: 100%;
    }
    .tabs {
        display: flex;
        li {
            flex-basis: 50%;
            text-align: center;
            line-height: 86px;
            font-size: 34px;
        }
        .active {
            border-bottom: 6px solid #FF0000;
        }
    }
}
</style>